<?php //strip
/**
 * Form implementation for a single member.
 * 
 * @package odReservationsWpPlugin
 * @subpackage odReservationsWpPlugin_Forms
 * @author Ondrej Donek <ondrejd@gmail.com>
 */
class odReservationsWpPlugin_Forms_Member extends odWpPlugin_Form
{
  /**
   * Constructor - set up the member form.
   * 
   * @param string $aName Name of the form.
   * @param string $aDescription Description of the form.
   * @param array $aFields Array with form fields.
   * @param string $aDecorator Optional. Defaultly self::DECORATOR_SIMPLE.
   * @param odWpPlugin_Model_Interface|null $mModel
   * @return void
   */
	public function __construct()
	{
		parent::__construct(
		  'reservations_member_form',
		  '',
		  array(
	      'ID' => array(
	        'type' => self::TYPE_HIDDEN,
	        'label' => null
	      ),
	      'op' => array(
	        'type' => self::TYPE_HIDDEN,
	        'label' => null
	      ),
	      'login' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Login:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'password' => array(
	        'type' => self::TYPE_PASSWORD, 
	        'label' => __('Heslo:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'password_repeat' => array(
	        'type' => self::TYPE_PASSWORD, 
	        'label' => __('Opakujte heslo:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'surname' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Příjmení:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'firstname' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Křestní jméno:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'street' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Ulice:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'town' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Město:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'zip' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('PSČ:', odReservationsWpPlugin::TEXTDOMAIN)
	      ),
	      'email' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Emailová adresa:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'phone' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Telefon:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'member_num' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Zákaznické číslo:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'credits_ordered' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Objednáno kreditů:', odReservationsWpPlugin::TEXTDOMAIN),
	        'required' => true
	      ),
	      'credits_left' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Zbývá kreditů:', odReservationsWpPlugin::TEXTDOMAIN)
	      ),
	      'deleted' => array(
	        'type' => self::TYPE_CHECKBOX,
	        'label' => __('Smazán:', odReservationsWpPlugin::TEXTDOMAIN)
	      )
	    ),
	    self::DECORATOR_TABLE
		);
		
		$this->mValues = array(
			'credits_ordered' => 0,
			'credits_left' => 0
		);
	}
} // End of odReservationsWpPlugin_Forms_Member
